Using flow layers
Flow layer places 2D objects in rows. When a row is full, it places objects in a new row. You can set the direction and the starting point for laying out objects in a flow layer to any of the three axes.
For example, you can use a flow layer to show album covers in a music application, or images in a photo album.
Creating a flow layer
To create a flow layer:
- In the Project right-click the scene where you want to create a flow layout and select Create > Flow Layer.
- Add several objects to the flow layer.
For example, in the Project right-click the flow layer and select Create > Text Layer.
As you add objects, Kanzi Studio positions them along the axes defined by the Primary Direction and Secondary Direction properties.
Setting the direction of a flow layer
For a flow layer you can set both the starting point and the direction in which Kanzi adds objects to a flow layer.
To set the direction of a flow layer:
- Create a flow layer and add objects to it.
For example, add nine Text Layer objects.
- In the Properties set the flow layer direction:
- Primary Direction. This is the direction along which the objects are laid out until they reach the limit of the flow layer.
For example, for a flow layer with a Primary Direction set to Left to Right, the limit is set by the Layout Width property. However, if the Primary Direction is set to Top to Bottom, the limit is set by the Layout Height property. - Secondary Direction. This is the direction along which the objects are laid out when the objects exceed the limit set by the Primary Direction.
For example, to set a layout where objects are first added from left to right and then from top to bottom, set the Primary Direction to Left to Right and Secondary Direction to Top to Bottom.
Note that in order to make the flow layer go in the direction defined by the Secondary Direction, you must set the limit for the Primary Direction.
See also
Layers
Using flow layouts
Open topic with navigation